<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>轮播图</title>
  <style> 
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    .container {
      width: 500px;
      height: 300px;
      margin: 10px auto;
      overflow: hidden;
      position: relative;
    }
    .carousel {
      width: 100%;
      height: 100%;
      display: flex;
      transition: .5s;
    }
    .container .carousel .item{

    }
    .container .carousel img {
      width: 500px;
      height: 300px;
    }
    .indicator {
      position: absolute;
      bottom:  10px;
      display: flex;
      left: 50%;
      transform: translateX(-50%);
    }
    .indicator span {
      width: 20px;
      height: 20px;
      border: 2px solid #ccc;
      border-radius: 50%;
      margin-right: 5px;
    }
    .indicator span.active {
      border-color: #fff;
      background-color: #fff;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="carousel">
      <div class="item"><a href=""><img src="./img/01.jpg" alt="轮播图1"></a></div>
      <div class="item"><a href=""><img src="./img/02.jpg" alt="轮播图2"></a></div>
      <div class="item"><a href=""><img src="./img/03.jpg" alt="轮播图3"></a></div>
      <div class="item"><a href=""><img src="./img/04.jpg" alt="轮播图4"></a></div>
    </div>
    <div class="indicator">
      <span class="active"></span><span></span><span></span><span></span>
    </div>
  </div>
  <script src="./js/index.js"></script>
</body>
</html>